package ysc.cqnu.operdb.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import ysc.cqnu.operdb.entity.Dye;
import ysc.cqnu.operdb.entity.ResultData;
import ysc.cqnu.operdb.mapper.ZhuoSeMapper;
import ysc.cqnu.operdb.service.EnterZhuoSeInfoViewDetailsService;

@Service
public class EnterZhuoSeInfoViewDetailsServiceImpl implements EnterZhuoSeInfoViewDetailsService {
    @Autowired
    private ResultData resultData;
    @Autowired
    private Dye dye;
    @Autowired
    private ZhuoSeMapper zhuoSeMapper;
    @Override
    public ResultData enterZhuoSeInfoViewDetailsService(String id) {
        try {
            dye = zhuoSeMapper.zhuosedetails(id);
            resultData.flag="enterZhuoseInfoViewDetailsSuccess";
            resultData.data=dye;
            return resultData;
        }
        catch (Exception e){
            resultData.flag="enterZhuoseInfoViewDetailsFail";
            resultData.data=null;
            return resultData;
        }
    }
}
